package com.ling.pl.autoproject.definition.logic.model;

import com.ling.pl.core.commons.annotation.Dict;
import com.ling.pl.core.commons.annotation.ModelProperty;

import javax.persistence.Column;

/**
 * 对应页面行为和暴露的服务
 */
public class EntityAction {
    //实体行为信息
    @Column(name = "ENTITY_ID", length = 36)
    @ModelProperty(comment = "实体id")
    String entityId;

    @Column(name = "NAME", length = 150)
    @ModelProperty(comment = "中文名称")
    String name;

    @Column(name = "CODE", length = 150)
    @ModelProperty(comment = "方法名称", des = "命名需要符合java方法名称规范和事物命名规范")
    String code;

    @Column(name = "ACTION_TYPE", length = 50)
    @ModelProperty(comment = "对象类型")
    @Dict(code = "builder.entity.actionType", des = "用户自定义,实体处理逻辑,内置方法")
    String actionType;

    @Column(name = "LOGIC_ID", length = 36)
    @ModelProperty(comment = "实体处理逻辑时logic id")
    String logicId;

    @Column(name = "TIMEOUT")
    @ModelProperty(comment = "调用超时(毫秒)")
    Integer timeout;

    //服务接口设置
    @Column(name = "IS_EXPOSE")
    @ModelProperty(comment = "对外发布")
    Boolean isExpose;

    @Column(name = "OPERATION", length = 150)
    @ModelProperty(comment = "实体id", des = "对应EntityOperation")
    String operation;

    //系统开发
    @Column(name = "REQUIREMENT_ID", length = 36)
    @ModelProperty(comment = "需求id")
    String requirementId;

    @Column(name = "TODO", length = 500)
    @ModelProperty(comment = "todo")
    String todo;

}
